package com.rock.platform.util;

import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;

public class BASE64Utils {
	public static String decode(byte[] bytData) {
		BASE64Encoder encoder = new BASE64Encoder();
		String strRes = encoder.encode(bytData);

		return strRes;
	}

	public static byte[] decode(String strText) throws Exception {
		BASE64Decoder decoder = new BASE64Decoder();
		byte[] bytData = decoder.decodeBuffer(strText);

		return bytData;
	}
}
